package com.lbx.service.impl;

import com.lbx.entity.User;
import com.lbx.mapper.UserMapper;
import com.lbx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 吕兵星
 * @date 2020/10/24 22:46
 */
@Service
public class UserServiceImpl implements UserService {
   @Autowired
    private UserMapper userMapper;
    @Override
    public Boolean checkLogin(String name,String password) {

        if (userMapper.findOne(name)==null) {
            return false;
        }
        User one = userMapper.findOne(name);
        return one.getPwd().equals(password)?true:false;
    }
}
